<%-- 
    Document   : viewProductLeft
    Created on : Nov 18, 2012, 7:18:01 PM
    Author     : tuan
--%>

<%@page import="data.CategoryDAL"%>
<%@page import="data.CategoryDAL"%>
<%@page import="data.CategoryEntity"%>
<%@page import="data.CategoryEntity"%>
<%@page import="java.util.Collection"%>
<%@page import="data.ProductDAL"%>
<%@page import="java.util.Iterator"%>
<%@page import="data.ProductEntity"%>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>JSP Page</title>
    </head>
    <body>
        <div>
            <table class="">
                <%
                    Collection<CategoryEntity> list = CategoryDAL.listAll();
                    Iterator<CategoryEntity> it = list.iterator();
                    while (it.hasNext()) {
                        CategoryEntity entity = it.next();
                                        
                %>
                <tr>
                    <td></td>
                    <td align="left"
                                 bgcolor="#FFFFFF" 
                                 onMouseOver="this.style.backgroundColor='#1975FF'" 
                                 onMouseOut="this.style.backgroundColor='#FFFFFF'">
                        <a href="../viewProduct/viewProduct.jsp?CategoryID=<%=entity.getCategoryID()%>"><%= entity.getCategoryName()%></a>
                        <br>
                    </td>
                    <td></td>
                </tr>

               <%}%>
            </table>
        </div>
    </body>
</html>
